package com.taoym.voucher.common.enums;

import lombok.Getter;

/**
 * @coder taoym
 * @datetime 2021/7/14 16:12
 * @desc
 */
@Getter
public enum QuartzJobGroupEnum implements EnumsCommon {

    ORDER_GROUP(1, "订单组", "com.taoym.voucher.job.job.ActivityOrderJob"),
    ACCESS_TOKEN_GROUP(2, "小程序凭证组", "com.taoym.voucher.job.job.AccessTokenJob"),
    ;

    private final Integer code;
    private final String msg;
    private final String classPath;

    QuartzJobGroupEnum(Integer code, String msg, String classPath) {
        this.code = code;
        this.msg = msg;
        this.classPath = classPath;
    }

    public static QuartzJobGroupEnum getMsg(Integer code) {
        for (QuartzJobGroupEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value;
            }
        }
        return null;
    }
}
